package com.zzj.security.jwt.service.impl;

import com.zzj.security.jwt.entity.SysUser;
import com.zzj.security.jwt.repository.SysUserRepository;
import com.zzj.security.jwt.service.SysUserService;
import org.hibernate.annotations.Cache;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * @ClassName SysUserServiceImpl
 * @Description TODO
 * @Author zhijun zeng at 20:15 2020/5/17
 * @Version 1.0
 **/
@Service("sysUserService")
@Transactional
public class SysUserServiceImpl implements SysUserService {

    @Autowired
    private SysUserRepository sysUserRepository;

    public SysUser findByUsername(String username) {
        return sysUserRepository.findByUsername(username);
    }

    @Override
    public List<SysUser> findAll() {
        return sysUserRepository.findAll();
    }
}
